﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

#nullable disable

namespace Faser_Shop.Models.Database
{
    public partial class LogisticsRecord
    {
        public LogisticsRecord()
        {
            Orders = new HashSet<Order>();
        }

        [Key]
        [Column("TrackingID")]
        public int TrackingId { get; set; }
        public int? WarehouseCode { get; set; }
        [StringLength(50)]
        public string TrackingNumber { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? CreationTime { get; set; }

        [ForeignKey(nameof(WarehouseCode))]
        [InverseProperty(nameof(LogisticsWarehouse.LogisticsRecords))]
        public virtual LogisticsWarehouse WarehouseCodeNavigation { get; set; }
        [InverseProperty(nameof(Order.Tracking))]
        public virtual ICollection<Order> Orders { get; set; }
    }
}
